part of 'device_bloc.dart';

abstract class DeviceEvent extends Equatable {}

class DeviceConnectEvent extends DeviceEvent {
  @override
  List<Object?> get props => [];
}

class DeviceFetchCompleteEvent extends DeviceEvent {
  @override
  List<Object?> get props => [];
}

class DeviceDisconnectEvent extends DeviceEvent {
  @override
  List<Object?> get props => [];
}

class DeviceStartReadEvent extends DeviceEvent {
  final List<String> antennaList;

  DeviceStartReadEvent(this.antennaList);

  @override
  List<Object?> get props => [antennaList];
}

class DeviceConfigUpdateEvent extends DeviceEvent {
  final List<AntennaData> antenaData;

  DeviceConfigUpdateEvent({
    required this.antenaData,
  });

  @override
  List<Object?> get props => [antenaData];
}

class DeviceStorageEvent extends DeviceEvent {
  final StorageInfo storageInfo;

  DeviceStorageEvent(this.storageInfo);

  @override
  List<Object?> get props => [storageInfo];
}

class DeviceSocketEvent extends DeviceEvent {
  final ConnectStatus connectStatus;

  DeviceSocketEvent(this.connectStatus);

  @override
  List<Object?> get props => [connectStatus];
}

class DeviceResetReadingStatusEvent extends DeviceEvent {
  final String message;
  final bool readFinish;
  final bool isReading;
  final bool showForceOperationButton;
  final List<String> collectList;
  final List<String> handleList;
  final String toolKitId;
  final int operationType;

  DeviceResetReadingStatusEvent(
      {this.message = '',
      this.readFinish = false,
      this.isReading = false,
      this.showForceOperationButton = false,
      this.collectList = const <String>[],
      this.handleList = const <String>[],
      this.toolKitId = '',
        this.operationType=0
      });

  @override
  List<Object?> get props => [
        message,
        readFinish,
        isReading,
        showForceOperationButton,
        collectList,
        handleList,
        toolKitId,
        operationType
      ];
}

class DeviceReadingEpcEvent extends DeviceEvent {
  final List<String> epcList;

  DeviceReadingEpcEvent(this.epcList);

  @override
  // TODO: implement props
  List<Object?> get props => [epcList];
}

class DeviceReadingStatusChangeEvent extends DeviceEvent {
  final bool isReading;
  final bool readFinish;

  DeviceReadingStatusChangeEvent(this.isReading, this.readFinish);

  @override
  List<Object?> get props => [isReading, readFinish];
}

// class DeviceButtonStatusEvent extends DeviceEvent{
//   final bool showForceOperationButton;
//   DeviceButtonStatusEvent(this.showForceOperationButton);
//
//   @override
//   List<Object?> get props => [showForceOperationButton];
// }

class DeviceNoticeEvent extends DeviceEvent {
  final String notice;

  DeviceNoticeEvent(this.notice);

  @override
  List<Object?> get props => [notice];
}

class DeviceVersionEvent extends DeviceEvent {
  DeviceVersionEvent();

  @override
  List<Object?> get props => [];
}

class DeviceTemperatureEvent extends DeviceEvent {
  final double indoorTemperature;
  final double indoorHumidity;
  final bool heatStatus;
  final bool dehumidifyStatus;
  final bool exhaustStatus;
  final bool airConStatus;
  final bool autoStatus;
  final bool alarmStatus;
  final bool airCleanStatus;

  DeviceTemperatureEvent(
      this.indoorTemperature,
      this.indoorHumidity,
      this.heatStatus,
      this.dehumidifyStatus,
      this.exhaustStatus,
      this.airConStatus,
      this.autoStatus,
      this.alarmStatus,
      this.airCleanStatus);

  @override
  // TODO: implement props
  List<Object?> get props => [
        indoorTemperature,
        indoorHumidity,
        heatStatus,
        dehumidifyStatus,
        exhaustStatus,
        airConStatus,
        autoStatus,
        alarmStatus,
        airCleanStatus,
      ];
}
